resp_set <- sim_resp(ip = generate_ip(n = 12), theta = rnorm(10),
output = "response_set")
resp_set[1]
# Create an Response_set using the first and third element:
resp_set[c(1, 3)] # Order is important
resp_set[c(3, 1)]
resp_set[-2]
resp_set[c(TRUE, FALSE, TRUE)]
resp_set[c("S2", "S1")]
# Recycle, i.e. get all elements
resp_set[TRUE]
# Recycle, i.e. get all even elements
resp_set[c(FALSE, TRUE)]
# Use logical expressions
resp_set[resp_set$examinee_id %in% c("S3", "S8")]
Run the code above in your browser using DataLab